package businessLogic;

import Definitions.ManagerException;
import java.util.Collection;
import java.util.List;
import javax.ejb.Local;
import model.Club;
import model.League;
import model.Manager;
import model.Offer;
import model.Player;

/**
 *
 * @author kidney
 */
@Local
public interface ManagerBeanLocal {

    public void loginAndInit(String login) throws ManagerException;

    public void loginAndInitNewManager(Manager manager);

    public abstract Club createClub(String name, String stadiumName, League league) throws ManagerException;

    void increaseStadiumCapacity(int seatCount) throws ManagerException;

    void improveStadiumEquipment() throws ManagerException;

    void renameCurrentClub(String newName) throws ManagerException;

    void renameCurrentClubStadium(String newStadiumName);

    void switchClub(Club club);

    public abstract void changePlayerPosition(Player player, String newPosition);

    Offer createOffer(Player requestedPlayer, int offeredPrice) throws ManagerException;

    void cancelOffer(Offer offer);

    void denyOffer(Offer offer);

    void acceptOffer(Offer offer) throws ManagerException;

    List<Offer> lookupMyOffers();

    List<Offer> lookupOffersForMyPlayers();

    void changePassword(String oldPassword, String newPassword) throws ManagerException;

    public void generateSquad(Club club, String country) throws ManagerException;

    public Manager getManager();

    public Club getClub();

    public List<League> getAvailableLeagues();

    public List<League> getAllLeagues();

    public List<Club> getLeagueClubs(League league);

    public List<Player> getClubGoaltenders(Club c);

    public List<Player> getClubLinePlayers(Club employer, Integer line);

    public List<Player> getClubSubstitutes(Club employer);
    
    public League getLeagueWithId(String id);

    public List<Club> getClubs();

    public List<String> getPossibleGoaltenderPositionsInClub(Club currentClub);

    public List<String> getPossiblePositionsInClub(Club currentClub);

    public League createLeague(int leagueId, String leagueName, String leagueCountry) throws ManagerException;

}
